
 <!DOCTYPE HTML>
<html >
<head>
  <meta charset="UTF-8">
  
    <title>springboot和springmvc | Typhoon&#39;s code space</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="typhoon">
    

    
    <meta name="description" content="springboot是一个用于快速构建应用程序的实用工具，在本文中我们将对springboot与springmvc进行对比分析。">
<meta name="keywords" content="springboot">
<meta property="og:type" content="article">
<meta property="og:title" content="springboot和springmvc">
<meta property="og:url" content="http://scorpioaeolus.oschina.io/2018/11/25/springboot和springmvc/index.html">
<meta property="og:site_name" content="Typhoon&#39;s code space">
<meta property="og:description" content="springboot是一个用于快速构建应用程序的实用工具，在本文中我们将对springboot与springmvc进行对比分析。">
<meta property="og:image" content="http://scorpioaeolus.oschina.io/typhoon/2018/11/25/springboot和springmvc/sb1.png">
<meta property="og:updated_time" content="2018-11-25T03:50:38.017Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="springboot和springmvc">
<meta name="twitter:description" content="springboot是一个用于快速构建应用程序的实用工具，在本文中我们将对springboot与springmvc进行对比分析。">
<meta name="twitter:image" content="http://scorpioaeolus.oschina.io/typhoon/2018/11/25/springboot和springmvc/sb1.png">

    
    <link rel="alternative" href="/atom.xml" title="Typhoon&#39;s code space" type="application/atom+xml">
    
    
    <link rel="icon" href="/typhoon/img/java.png">
    
    
    <link rel="apple-touch-icon" href="/typhoon/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/typhoon/img/jacman.jpg">
    
    <link rel="stylesheet" href="/typhoon/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/typhoon/"><img src="/typhoon/img/java.png" alt="Typhoon&#39;s code space" title="Typhoon&#39;s code space"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/typhoon/" title="Typhoon&#39;s code space">Typhoon&#39;s code space</a></h1>
				<h2 class="blog-motto"></h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/typhoon/">主页</a></li>
					
						<li><a href="/typhoon/archives">归档</a></li>
					
						<li><a href="/typhoon/about">关于</a></li>
					
					<li>
 					
					<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="Search" />
						<input type="hidden" name="q" value="site:scorpioaeolus.oschina.io">
					</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main" class="post" itemscope itemprop="blogPost">
  
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/typhoon/2018/11/25/springboot和springmvc/" title="springboot和springmvc" itemprop="url">springboot和springmvc</a>
  </h1>
  <p class="article-author">By
       
		<a href="/typhoon/about" title="typhoon" target="_blank" itemprop="author">typhoon</a>
		
  <p class="article-time">
    <time datetime="2018-11-25T03:33:47.000Z" itemprop="datePublished"> Published 2018-11-25</time>
    
  </p>
</header>
	<div class="article-content">
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">Contents</strong>
		
			<ol class="toc"><li class="toc-item toc-level-5"><a class="toc-link" href="#介绍"><span class="toc-number">1.</span> <span class="toc-text">介绍</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#1-springmvc"><span class="toc-number">2.</span> <span class="toc-text">1.springmvc</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-springboot"><span class="toc-number">3.</span> <span class="toc-text">2.springboot</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#总结"><span class="toc-number">4.</span> <span class="toc-text">总结</span></a></li></ol>
		
		</div>
		
		<pre><code>springboot是一个用于快速构建应用程序的实用工具，在本文中我们将对springboot与springmvc进行对比分析。
</code></pre><a id="more"></a>
<h5 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h5><pre><code>    springboot是一个用于快速设置应用程序的实用工具，它提供了开箱即用的配置来构建基于Spring的应用程序，
对于初学者来说，这带来了许多困扰，初学者提出的一个基本的问题就是springboot和spirngmvc之间的区别是什么？
    这篇文章旨在回答这个问题，到文章结束时，我们将对以下几点有一个基本的了解：
</code></pre><ul>
<li>什么是spring框架？</li>
<li>MVC框架综述。</li>
<li>什么是springboot？</li>
<li>springboot是springmvc的替代品吗？</li>
<li>springboot与springmvc对比分析<pre><code>在这篇文章的末尾，我们将了解springmvc和springboot是Spring生态系统的一部分，它们不是竞争关系，而是相互协同，
</code></pre>  从某种程度上springmvc和springboot是不可比较或者说互斥的。<pre><code>为了更好的理解，我们来看一下springmvc和springboot以及它们帮我们解决了什么问题。
</code></pre><h5 id="1-springmvc"><a href="#1-springmvc" class="headerlink" title="1.springmvc"></a>1.springmvc</h5><pre><code>Spring MVC是基于Spring框架的基于模型视图控制器（MVC）的Web框架，它是基于servlet API构建的原始Web框架，
</code></pre>  为构建Web应用程序提供了许多现成的特性：</li>
<li>角色的清晰分离，每个角色——控制器、验证器、命令对象、表单对象、模型对象、DispatcherServlet、处理程序映射、视图解析器<br>等等——都可以由专门的对象来完成</li>
<li>框架和作为javabean的应用程序类的强大而直接的配置</li>
<li>可定制的绑定和验证</li>
<li>可定制的映射处理和视图解析</li>
<li>强大的主题和本地化解决特性<h5 id="2-springboot"><a href="#2-springboot" class="headerlink" title="2.springboot"></a>2.springboot</h5><pre><code>springboot是一个强大的实用工具，可以通过提供默认配置来快速设置应用程序，从而构建基于Spring的应用程序，
</code></pre>  下面是springboot的特性：</li>
<li>最适合使用的微服务平台之一</li>
<li>使用智能和约定优于配置的方式，可以显著简化项目的启动和配置阶段</li>
<li>基于application.properties或YML文件的强大和灵活的配置管理</li>
<li>自动配置模块</li>
<li>springboot starters为你的应用程序提供现成的自动配置</li>
<li>生产环境现成的actuator监控模块</li>
<li><p>通过采用固定视图来简化Spring依赖<br><strong>2.1 为什么使用springboot</strong></p>
<pre><code>很显然有一个问题就是“为什么我们需要springboot”？ 当我们有Spring和SpringMVC框架时，要回答这个问题，
</code></pre><p>  让我们看看搭建SpringMVC应用程序的步骤（不使用Spring Boot）：</p>
</li>
<li>使用我们选择的Maven或IDE创建Web应用程序</li>
<li>复制标准Web应用程序配置（Spring MVC应用程序的web.xml配置）</li>
<li>根据我们的要求调整以上配置</li>
<li>配置Spring MVC标准bean，如ViewResolver，MessageSource等</li>
<li>配置应用程序的数据库属性</li>
<li><p>在我们开始使用它之前建立数据库层并确保基础数据库连接到位（EntityManagerFactory，TransactionManager等）</p>
<pre><code>这不是最终的列表，对于企业应用程序，上面的列表可能会更长，在较高的层面上，这是一些配置的样子：  
</code></pre><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">MyWebApplicationInitializer</span> <span class="keyword">implements</span> <span class="title">WebApplicationInitializer</span> </span>&#123;</div><div class="line"> <span class="meta">@Override</span></div><div class="line"> <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onStartup</span><span class="params">(ServletContext servletCxt)</span> </span>&#123;</div><div class="line">  <span class="comment">// Load Spring web application configuration</span></div><div class="line">  AnnotationConfigWebApplicationContext ac = <span class="keyword">new</span> AnnotationConfigWebApplicationContext();</div><div class="line">  ac.register(AppConfig.class);</div><div class="line">  ac.refresh();</div><div class="line">  <span class="comment">// Create and register the DispatcherServlet</span></div><div class="line">  DispatcherServlet servlet = <span class="keyword">new</span> DispatcherServlet(ac);</div><div class="line">  ServletRegistration.Dynamic registration = servletCxt.addServlet(<span class="string">"app"</span>, servlet);</div><div class="line">  registration.setLoadOnStartup(<span class="number">1</span>);</div><div class="line">  registration.addMapping(<span class="string">"/app/*"</span>);</div><div class="line"> &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<pre><code>对于传统的web.xml配置来注册和初始化DispatcherServlet：
</code></pre><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div></pre></td><td class="code"><pre><div class="line">&lt;web-app&gt;</div><div class="line">	&lt;listener&gt;</div><div class="line">		&lt;listener-<span class="class"><span class="keyword">class</span>&gt;<span class="title">org</span>.<span class="title">springframework</span>.<span class="title">web</span>.<span class="title">context</span>.<span class="title">ContextLoaderListener</span>&lt;/<span class="title">listener</span>-<span class="title">class</span>&gt;</span></div><div class="line">	&lt;/<span class="title">listener</span>&gt;</div><div class="line">	&lt;<span class="title">context</span>-<span class="title">param</span>&gt;</div><div class="line">		&lt;<span class="title">param</span>-<span class="title">name</span>&gt;<span class="title">contextConfigLocation</span>&lt;/<span class="title">param</span>-<span class="title">name</span>&gt;</div><div class="line">		&lt;<span class="title">param</span>-<span class="title">value</span>&gt;/<span class="title">WEB</span>-<span class="title">INF</span>/<span class="title">app</span>-<span class="title">context</span>.<span class="title">xml</span>&lt;/<span class="title">param</span>-<span class="title">value</span>&gt;</div><div class="line">	&lt;/<span class="title">context</span>-<span class="title">param</span>&gt;</div><div class="line">	&lt;<span class="title">servlet</span>&gt;</div><div class="line">		&lt;<span class="title">servlet</span>-<span class="title">name</span>&gt;<span class="title">app</span>&lt;/<span class="title">servlet</span>-<span class="title">name</span>&gt;</div><div class="line">		&lt;<span class="title">servlet</span>-<span class="title">class</span>&gt;<span class="title">org</span>.<span class="title">springframework</span>.<span class="title">web</span>.<span class="title">servlet</span>.<span class="title">DispatcherServlet</span>&lt;/<span class="title">servlet</span>-<span class="title">class</span>&gt;</div><div class="line">		&lt;<span class="title">init</span>-<span class="title">param</span>&gt;</div><div class="line">			&lt;<span class="title">param</span>-<span class="title">name</span>&gt;<span class="title">contextConfigLocation</span>&lt;/<span class="title">param</span>-<span class="title">name</span>&gt;</div><div class="line">			&lt;<span class="title">param</span>-<span class="title">value</span>&gt;&lt;/<span class="title">param</span>-<span class="title">value</span>&gt;</div><div class="line">		&lt;/<span class="title">init</span>-<span class="title">param</span>&gt;</div><div class="line">		&lt;<span class="title">load</span>-<span class="title">on</span>-<span class="title">startup</span>&gt;1&lt;/<span class="title">load</span>-<span class="title">on</span>-<span class="title">startup</span>&gt;</div><div class="line">	&lt;/<span class="title">servlet</span>&gt;</div><div class="line">	&lt;<span class="title">servlet</span>-<span class="title">mapping</span>&gt;</div><div class="line">		&lt;<span class="title">servlet</span>-<span class="title">name</span>&gt;<span class="title">app</span>&lt;/<span class="title">servlet</span>-<span class="title">name</span>&gt;</div><div class="line">		&lt;<span class="title">url</span>-<span class="title">pattern</span>&gt;/<span class="title">app</span>/*&lt;/<span class="title">url</span>-<span class="title">pattern</span>&gt;</div><div class="line">	&lt;/<span class="title">servlet</span>-<span class="title">mapping</span>&gt;</div><div class="line">&lt;/<span class="title">web</span>-<span class="title">app</span>&gt;</div></pre></td></tr></table></figure>
<pre><code>这些配置会根据第三方API不断增加：
</code></pre></li>
<li>配置并使用JPA或Hibernate</li>
<li>创建DB配置</li>
<li>其他API的配置<pre><code>这些步骤需要初始项目配置，但是它们会在项目或应用程序生命周期中增加其他复杂性：
</code></pre></li>
<li>每个模块都有自己的配置</li>
<li>每个模块都有自己的依赖项集（第三方依赖项）</li>
<li>升级应用程序（例如Spring 4.x到5.x）将很复杂，因为我们需要确保正确升级所有必需的依赖项</li>
<li>如果某些依赖项无法正常工作，那么尝试在大型应用程序中查找根本原因非常复杂且具有挑战性</li>
<li><p>springboot提供了一个工具集来处理这些问题，让我们专注于编写业务规则而不是项目配置<br><strong>2.2 springboot自动配置 -智能体系</strong></p>
<p>  springboot的一个强大功能是它能够根据我们添加到类路径中的jar依赖项自动配置我们的应用程序。<br>  springboot自动配置是一个智能体系，它可以根据我们类路径中配置的jar为我们提供随时可用的应用程序，例如，<br>  如果Spring Boot在类路径中找到HSQLDB，它将自动为我们配置内存数据库。</p>
<pre><code>自动配置是一种固定的体系，它根据类路径配置为我们创建一些默认值，但同时，它足够智能，可以让我们灵活地覆盖它。
</code></pre><p>  自动配置是非侵入性的，在任何时候，你都可以定义自己的配置以替换自动配置的特定部分，例如，如果添加自己的DataSource bean，<br>  则默认的嵌入式数据库支持会退出。<br><strong>2.3 springboot Starters –智能体系</strong></p>
<pre><code>springboot Starters是一组方便易用的依赖描述符，可以轻松包含在任何级别的应用程序中，这些启动器作为Spring相关技术的引入程序，
</code></pre><p>  我们不再需要担心依赖关系，它们将由springboot Starters自动管理。</p>
<pre><code>为了更好地理解，我们举一个例子，使用springboot构建一个Web应用程序。 如果要使用springboot，我们只需要在我们的pom.xml中添加
</code></pre><p>  spring-boot-starter-web启动器即可：</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">&lt;dependency&gt;</div><div class="line">   &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;</div><div class="line">   &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;</div><div class="line">&lt;/dependency&gt;</div></pre></td></tr></table></figure>
<pre><code>pom.xml中的上述条目将确保所有必需的依赖项都在类路径中，并且设置了Web应用中开始工作的所有配置 如果查看IDE，
</code></pre><p>  则可能在依赖项部分下具有类似的输出：</p>
<img src="/typhoon/2018/11/25/springboot和springmvc/sb1.png" alt="springboot" title="springboot">
</li>
</ul>
<h5 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h5><pre><code>    在这篇文章中，我们对springboot和springmvc进行了对比分析，我们了解到springboot和springmvc是完全不同的，
并且很好地相互补充，springboot提供了一个工具集，可以快速创建Spring应用程序。 
</code></pre>  
	</div>
		<footer class="article-footer clearfix">
<div class="article-catetags">

<div class="article-categories">
  <span></span>
  <a class="article-category-link" href="/typhoon/categories/springboot/">springboot</a>
</div>


  <div class="article-tags">
  
  <span></span> <a href="/typhoon/tags/springboot/">springboot</a>
  </div>

</div>



	<div class="article-share" id="share">
	
	  <div data-url="http://scorpioaeolus.oschina.io/2018/11/25/springboot和springmvc/" data-title="springboot和springmvc | Typhoon&#39;s code space" data-tsina="null" class="share clearfix">
	  </div>
	
	</div>


</footer>

   	       
	</article>
	
<nav class="article-nav clearfix">
 
 <div class="prev" >
 <a href="/typhoon/2018/11/25/springboot-统一异常拦截/" title="springboot-统一异常拦截">
  <strong>上一篇：</strong><br/>
  <span>
  springboot-统一异常拦截</span>
</a>
</div>


<div class="next">
<a href="/typhoon/2018/11/24/什么是springboot/"  title="什么是springboot">
 <strong>下一篇：</strong><br/> 
 <span>什么是springboot
</span>
</a>
</div>

</nav>

	


</div>  
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">Contents</strong>
 
 <ol class="toc"><li class="toc-item toc-level-5"><a class="toc-link" href="#介绍"><span class="toc-number">1.</span> <span class="toc-text">介绍</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#1-springmvc"><span class="toc-number">2.</span> <span class="toc-text">1.springmvc</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#2-springboot"><span class="toc-number">3.</span> <span class="toc-text">2.springboot</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#总结"><span class="toc-number">4.</span> <span class="toc-text">总结</span></a></li></ol>
 
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  


  
<div class="categorieslist">
	<p class="asidetitle">Categories</p>
		<ul>
		
		  
			<li><a href="/typhoon/categories/dubbo/" title="dubbo">dubbo<sup>8</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/java性能优化/" title="java性能优化">java性能优化<sup>17</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/java源码分析/" title="java源码分析">java源码分析<sup>1</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/motan/" title="motan">motan<sup>2</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/spring/" title="spring">spring<sup>11</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/springboot/" title="springboot">springboot<sup>28</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/springmvc/" title="springmvc">springmvc<sup>1</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/容器/" title="容器">容器<sup>1</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/工具/" title="工具">工具<sup>7</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/性能优化/" title="性能优化">性能优化<sup>5</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/架构/" title="架构">架构<sup>8</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/案例分析/" title="案例分析">案例分析<sup>13</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/缓存/" title="缓存">缓存<sup>4</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/设计模式/" title="设计模式">设计模式<sup>3</sup></a></li>
		  
		
		  
			<li><a href="/typhoon/categories/面试题/" title="面试题">面试题<sup>1</sup></a></li>
		  
		
		</ul>
</div>


  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			
				<li><a href="/typhoon/tags/springboot/" title="springboot">springboot<sup>28</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/java性能优化/" title="java性能优化">java性能优化<sup>9</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/限流/" title="限流">限流<sup>3</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/Spring5/" title="Spring5">Spring5<sup>3</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/设计模式/" title="设计模式">设计模式<sup>3</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/案例分析/" title="案例分析">案例分析<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/性能优化/" title="性能优化">性能优化<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/Spring/" title="Spring">Spring<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/dubbo/" title="dubbo">dubbo<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/分页/" title="分页">分页<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/并发/" title="并发">并发<sup>2</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/异常拦截/" title="异常拦截">异常拦截<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/dubbo分布式事务/" title="dubbo分布式事务">dubbo分布式事务<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/自带图片/" title="自带图片">自带图片<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/svn导出mvn项目/" title="svn导出mvn项目">svn导出mvn项目<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/dubbo过滤器/" title="dubbo过滤器">dubbo过滤器<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/排序性能对比/" title="排序性能对比">排序性能对比<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/ListenableFuture/" title="ListenableFuture">ListenableFuture<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/PropertyChangeListener/" title="PropertyChangeListener">PropertyChangeListener<sup>1</sup></a></li>
			
		
			
				<li><a href="/typhoon/tags/jdbcTemplate高可用/" title="jdbcTemplate高可用">jdbcTemplate高可用<sup>1</sup></a></li>
			
		
		</ul>
</div>


  <div class="linkslist">
  <p class="asidetitle">Links</p>
    <ul>
        
          <li>
            
            	<a href="https://coderq.com" target="_blank" title="一个面向程序员交流分享的新一代社区">码农圈</a>
            
          </li>
        
          <li>
            
            	<a href="http://wuchong.me" target="_blank" title="Jark&#39;s Blog">Jark&#39;s Blog</a>
            
          </li>
        
    </ul>
</div>

  


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>

  <div class="weiboshow">
  <p class="asidetitle">Weibo</p>
    <iframe width="100%" height="119" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=null&verifier=b3593ceb&dpc=1"></iframe>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> Hello ,I&#39;m a java coder. <br/>
			This is my blog,believe it or not.</p>
	</section>
	 
	<div class="social-font" class="clearfix">
		
		
		
		
		
		
		
		
		
		
		<a href="mailto:ScorpioAeolus@163.com" target="_blank" class="icon-email" title="Email Me"></a>
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2019 
		
		<a href="/typhoon/about" target="_blank" title="typhoon">typhoon</a>
		
		
		</p>
</div>
</footer>
    <script src="/typhoon/js/jquery-2.0.3.min.js"></script>
<script src="/typhoon/js/jquery.imagesloaded.min.js"></script>
<script src="/typhoon/js/gallery.js"></script>
<script src="/typhoon/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  c.click(function(){
    ta.css('display', 'block').addClass('fadeIn');
  });
  o.click(function(){
    ta.css('display', 'none');
  });
  $(window).scroll(function(){
    ta.css("top",Math.max(140,320-$(this).scrollTop()));
  });
});
</script>


<script type="text/javascript">
$(document).ready(function(){ 
  var $this = $('.share'),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      title = $this.attr('data-title'),
      tsina = $this.attr('data-tsina'),
      description = $this.attr('description');
  var html = [
  '<div class="hoverqrcode clearfix"></div>',
  '<a class="overlay" id="qrcode"></a>',
  '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
  '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
  '<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
  '<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
  '<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
  '<span title="Share to"></span>'
  ].join('');
  $this.append(html);

  $('.hoverqrcode').hide();

  var myWidth = 0;
  function updatehoverqrcode(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
    var qrsize = myWidth > 1024 ? 200:100;
    var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
    var p = $('.article-share-qrcode').position();
    $('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
                          .css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
                          .qrcode(options);
  };
  $(window).resize(function(){
    $('.hoverqrcode').hide();
  });
  $('.article-share-qrcode').click(function(){
    updatehoverqrcode();
    $('.hoverqrcode').toggle();
  });
  $('.article-share-qrcode').hover(function(){}, function(){
      $('.hoverqrcode').hide();
  });
});   
</script>









<link rel="stylesheet" href="/typhoon/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/typhoon/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->



<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?e6d1f421bbc9962127a50488f9ed37d1";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>



<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="Back to Top"><img src="/typhoon/img/scrollup.png"/></a>
	</div>
	<script src="/typhoon/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
</html>
